package com.luzj.controller;

import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2016/9/6.
 */
@Controller
public class HelloController {
    @RequestMapping("/hello/{name}")
    public String hellow(@PathVariable("name")String name,Model model){
//        return "哈喽，Spring Boot ！";
        model.addAttribute("name",name);
        return "hello";
    }
//    public static void main(String[] args){
//        SpringApplication.run(HelloController.class,args);
//    }
}
